#include "Data.h"


//电机相关
float sensor_direction =-1;//编码器方向
float pole_pairs = 7;//电机极对数
float voltage_power_supply =12;//供电电压
float Ualpha=0,Ubeta=0,Ua=0,Ub=0,Uc=0;
float zero_electric_angle=0;

//PID相关
PID PID_Pos;//位置PID
PID PID_Vel;//速度PID
PID PID_Cur;//电流PID
float position;//位置
float velocity;//速度
float current;//电流

//电流采集相关
float gain_a,gain_b,gain_c;
float offset_ia,offset_ib,offset_ic;//采集的3路电流
float volts_to_amps_ratio;
float shunt_resistor = 0.01;//采样电阻值
float amp_gain  = 50;//运放增益
float current_a,current_b;//帕克变换的值
